package com.cbwl.eoas.cms.service.impl.eoas;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cbwl.eoas.cms.api.eoas.IAppOptionFeedbackService;
import com.cbwl.eoas.cms.dao.eoas.IAppOptionFeedbackDao;
import com.cbwl.eoas.cms.model.eoas.AppOptionFeedbackDTO;
import com.cbwl.eoas.common.base.BaseServiceImpl;
import com.cbwl.eoas.common.util.jpush.JPush;


/**
 * 
 * <p>[描述信息：AppOptionFeedbackService接口]</p>
 *
 * @author 虞云波 - yuyunbo@3856.cc
 * @version 1.0 Created on 2017年10月12日 下午13:29:23
 */
@Service("appOptionFeedbackService")
public class AppOptionFeedbackServiceImpl  extends BaseServiceImpl<AppOptionFeedbackDTO>  implements IAppOptionFeedbackService  {

	@Autowired
	private IAppOptionFeedbackDao iappOptionFeedbackDao;
	
	@Autowired
	private JPush jPush;
	
	
	/**
	 * 
	 * <p>回复意见，并将消息推送给终端</p>
	 * 
	 * @see com.cbwl.eoas.cms.api.eoas.IAppOptionFeedbackService#updSendPushFeedBack(com.cbwl.eoas.cms.model.eoas.AppOptionFeedbackDTO)
	 * @author: 虞云波 - yuyunbo@3856.cc 
	 * @date: Created on 2017年11月28日 下午3:38:33
	 */
	@Override
	public int updSendPushFeedBack(AppOptionFeedbackDTO bean) throws Exception {
		//推送给提意见的用户
		jPush.pushWithAlias(jPush.getUserClient(), bean.getAofBackContext(), bean.getAofKey());
		
		return iappOptionFeedbackDao.updateObject(bean);
		
		
	}
	
	
	
	
}
